Reftest background-origin with various background-clip values
authorAlexander Larsson <alexl@redhat.com>
Thu, 24 Nov 2011 21:00:49 +0000 (22:00 +0100)
committerAlexander Larsson <alexl@redhat.com>
Fri, 25 Nov 2011 15:14:20 +0000 (16:14 +0100)
tests/reftests/Makefile.am
tests/reftests/background-origin.css [new file with mode: 0644]
tests/reftests/background-origin.ref.ui [new file with mode: 0644]
tests/reftests/background-origin.ui [new file with mode: 0644]
tests/reftests/reference-background-origin.png [new file with mode: 0644]

index b3ffb1e78446a8ba9c19fae0d6daca52a95f6a3e..2e0624f09766f907f055921ca535d04f782583db 100644 (file)
@@ -32,6 +32,10 @@ EXTRA_DIST += \
        background-color-transparent.css \
        background-color-transparent.ref.ui \
        background-color-transparent.ui \
+       background-origin.css \
+       background-origin.ref.ui \
+       background-origin.ui \
+       reference-background-origin.png \
        border-color-default.css \
        border-color-default.ref.ui \
        border-color-default.ui \
diff --git a/tests/reftests/background-origin.css b/tests/reftests/background-origin.css
new file mode 100644 (file)
index 0000000..22b22ee
--- /dev/null
@@ -0,0 +1,65 @@
+* {
+  engine: none;
+  border-style: none;
+  border-image: none;
+  background-image: none;
+  background-clip: border-box;
+  background-repeat: no-repeat;
+  border-radius: 0;
+}
+
+GtkWindow {
+  background-color: rgb(255,255,255);
+}
+
+GtkButton {
+  border-width: 5;
+  border-style: solid;
+  border-color: rgba(255,0,0,0.5);
+  padding: 10;
+  background-color: rgb(0,0,255);
+
+  background-image: url("green-20x20.png");
+}
+
+#button1 {
+  background-origin: border-box;
+  background-clip: border-box;
+}
+#button2 {
+  background-origin: padding-box;
+  background-clip: border-box;
+}
+#button3 {
+  background-origin: content-box;
+  background-clip: border-box;
+}
+#button4 {
+  background-origin: border-box;
+  background-clip: padding-box;
+}
+#button5 {
+  background-origin: padding-box;
+  background-clip: padding-box;
+}
+#button6 {
+  background-origin: content-box;
+  background-clip: padding-box;
+}
+#button7 {
+  background-origin: border-box;
+  background-clip: content-box;
+}
+#button8 {
+  background-origin: padding-box;
+  background-clip: content-box;
+}
+#button9 {
+  background-origin: content-box;
+  background-clip: content-box;
+}
+
+GtkButton#reference {
+  border-width: 0;
+  background-image: url("reference-background-origin.png");
+}
diff --git a/tests/reftests/background-origin.ref.ui b/tests/reftests/background-origin.ref.ui
new file mode 100644 (file)
index 0000000..d1e1cc7
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <property name="width_request">154</property>
+    <property name="height_request">680</property>
+    <child>
+      <object class="GtkButton" id="button">
+       <property name="name">reference</property>
+       <property name="visible">True</property>
+       <property name="can_focus">True</property>
+       <property name="receives_default">True</property>
+       <property name="use_action_appearance">False</property>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/background-origin.ui b/tests/reftests/background-origin.ui
new file mode 100644 (file)
index 0000000..6cc188b
--- /dev/null
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkWindow" id="window1">
+    <property name="can_focus">False</property>
+    <property name="type">popup</property>
+    <child>
+      <object class="GtkBox" id="box1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">5</property>
+        <property name="border-width">5</property>
+        <child>
+         <object class="GtkButton" id="button1">
+           <property name="name">button1</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button2">
+           <property name="name">button2</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button3">
+           <property name="name">button3</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button4">
+           <property name="name">button4</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button5">
+           <property name="name">button5</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button6">
+           <property name="name">button6</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button7">
+           <property name="name">button7</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button8">
+           <property name="name">button8</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+        <child>
+         <object class="GtkButton" id="button9">
+           <property name="name">button9</property>
+           <property name="visible">True</property>
+           <property name="can_focus">True</property>
+           <property name="receives_default">True</property>
+           <property name="use_action_appearance">False</property>
+           <property name="width_request">144</property>
+           <property name="height_request">70</property>
+         </object>
+       </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/tests/reftests/reference-background-origin.png b/tests/reftests/reference-background-origin.png
new file mode 100644 (file)
index 0000000..fb4ee23
Binary files /dev/null and b/tests/reftests/reference-background-origin.png differ